<template>
	<view class="custom-header">
		<div class="address">
			<text>{{address}}</text>
		</div>

	</view>

<!--  #ifdef  MP -->

<!--  #endif -->
   <!--  #ifdef  APP -->
   
   <!--  #endif -->
</template>

<script setup>
	

	
	import {
		onMounted,
		onUnmounted,
		ref
	} from "vue";

	let title = ref('nihao')
	let address = ref('加载中')

	import location from '@/utils/location.js'
import {getHomeBanner} from '@/api/home.js'



	onMounted(() => {
		location().then(res => {
			let city = res.regeocode.addressComponent.city;
			address.value = city

		});
		
		getHomeBanner().then(res=>{
			console.log(res)
		})

	});



	function jump() {
		uni.navigateTo({
			url: '/pages/login/login?a=1'
		})
	}
</script>

<style>
	.custom-header {
		background-color: aquamarine;
		height: 500rpx;
		/*  状态栏的高度   */
		padding-top: var(--status-bar-height);
		/* 375  50px */
		background: linear-gradient(to bottom, #021142, #EBEDF4);
	}

	.address {

		height: 50rpx;
		display: flex;
		padding: 0 10rpx;
		color: #fff;
		font-size: 30rpx;
	}
</style>